<template>
  <div>
    <Loding v-if="nowplays.length == 0"></Loding>
    <Filmitem title="预定" :nowplays="nowplays" v-else> </Filmitem>
  </div>
</template>

<script>
import Filmitem from "../../components/Filmitem";
//调用api请求数据方法
import { filmListDate } from "../../api/api";
import Loding from "../../components/Loading";

export default {
  data() {
    return {
      page: 1,
      //正在热映的数据源
      nowplays: [],
    };
  },
  components: {
    Filmitem,
    Loding,
  },

  async mounted() {
    let ret = await filmListDate(this.page);
    // console.log(ret)
    this.nowplays = ret.data.data.films;
  },
};
</script>
<style lang="scss" scoped>
</style>